
<?php
session_start();
include'config.php';
if ($_SESSION['masuk'] > 0){
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- DW6 -->
<head>
<!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
<title>Forum Batita</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="mm_training.css" type="text/css" />
<style type="text/css">
<!--
.style1 {color:#FFFFFF}
.style6 {color: #FFFFFF; font-weight: bold; }
.style11 {font-size: 12px; color: #FFFFFF; }
.style12 {font-size: 12px; color: #FFFFFF; font-weight: bold; }
.style17 {font-size: 36px}
-->
</style>
</head>
<body bgcolor="#FFFFFF">
<table width="1250" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr bgcolor="#33CC66">
	<td width="22" nowrap="nowrap" bgcolor="#66CC66"><img src="mm_spacer.gif" alt="" width="15" height="1" border="0" /></td>
	<td height="70" colspan="3" nowrap="nowrap" bgcolor="#66CC66" class="logo"><p><span class="style6"><img src="img/logo sipiyu png.png" alt="Sipiyu logo" width="152" height="122" />|<span class="style1">K</span></span><span class="style21 style1">ec. Genteng</span></p>    </td>
	<td width="4" bgcolor="#66CC66">&nbsp;</td>
	<td width="101" bgcolor="#66CC66"><table width="100" height="28" border="0" align="center" cellpadding="0" cellspacing="0" id="navigation2">
      <tr>
        <td width="53" height="28" align="center" nowrap="nowrap" class="navText"><a href="logout.php" class="style11">Logout</a></td>
        </tr>
    </table></td>
  </tr>

	
	<tr bgcolor="#D3DCE6">
	<td colspan="6"><img src="mm_spacer.gif" alt="" width="1" height="1" border="0" /></td>
	</tr>

	<tr bgcolor="#999999">
	<td width="22" nowrap="nowrap">&nbsp;</td>
	<td colspan="3" height="19"><table width="404" border="0" cellspacing="2" cellpadding="2">
        <tr>
          <td width="61"><div align="center" class="style12"><a href="user.php?page=home" class="style1">Home</a></div></td>
          <td width="62"><div align="center"><span class="style12"><a href="forum.php" class="style1">Forum</a></span></div></td>
          <td width="56"><div align="center"><span class="style12"><a href="info.php" class="style1">Info</a></span></div></td>
          <td width="67"><div align="center" class="style12"><a href="kalender.php" class="style1">Kalender</a></div></td>
          <td width="81"><div align="center" class="style12">Contact Us</div></td>
          <td width="39"><div align="center"><span class="style12">FAQ</span></div></td>
        </tr>
      </table></td>
	<td width="4">&nbsp;</td>
	<td width="101">&nbsp;</td>
  </tr>

	

	

	<tr bgcolor="#FFFFFF">
	<td colspan="2" valign="top" bgcolor="#FFFFFF">&nbsp;</td>
	<td width="887" valign="top"><p>&nbsp;</p>
	  <p class="style17">FORUM BATITA</p>
	  <p class="style6"><a href="new_topic.php"><strong><font size="+2">Buat Topik Baru</font></strong></a></p>
	  <td><h2>&nbsp;</h2></td>
	<td width="232" valign="top">&nbsp;</td>
	<td width="4">&nbsp;</td>
	<td width="101">&nbsp;</td>
  </tr>
	<tr bgcolor="#FFFFFF">
	  <td colspan="2" valign="top" bgcolor="#FFFFFF">&nbsp;</td>
      
      
      
      
      
      
	  <td valign="top"><p>&nbsp;</p>
      <p>&nbsp;</p></td>
	  <td valign="top">&nbsp;</td>
	  <td>&nbsp;</td>
	  <td>&nbsp;</td>
  </tr>

	<tr bgcolor="#D3DCE6">
	<td colspan="6"><img src="mm_spacer.gif" alt="" width="1" height="1" border="0" /></td>
	</tr>

  <tr>
	<td width="22">&nbsp;</td>
	<td width="4">&nbsp;</td>
	<td width="887">&nbsp;</td>
	<td width="232">&nbsp;</td>
	<td width="4">&nbsp;</td>
	<td width="101">&nbsp;</td>
  </tr>
</table>
</body>
</html>
<?php
}else{
	header("Location: login.php?p=1");
}


///membuat koneksi ke database
$server="localhost"; ///nama server
$username="root"; ///nama username mysql
$password=""; ///password, kosongkan jika tidak ada
$database="db_sipiyu"; ///nama database yang dipilih


mysql_connect($server, $username, $password) or die ("Koneksinya Gagal"); ///koneksi ke database
mysql_select_db($database) or die ("Databasenya Gak Ada"); ///memilih database, dan menampilkan pesan jika gagal


$pilih=mysql_query("SELECT judul_topik FROM topik_batita"); ///mengambil data dari tabel MySQL pengunjung


echo "<table border=\"10\" width=\"67%\" bordercolorlight=\"#000000\" align=\"center\">"; //membuat tag pembuka table
echo "<tr><td><center><strong><font size=\"+2\"><font color=\"#FF6600\">Judul Topik</font></font></strong></center></td></tr>"; //membuat heading table


//<td><center><strong><font size=\"+2\"><font color=\"#FF6600\">Isi Topik</font></font></strong></center></td>//

///tampilkan data dengan 'while'
while($pilih2=mysql_fetch_array($pilih)) ///mengambil data ke variabel $pilih2 dari $pilih
{
echo "<tr>";
echo "<td><font size=\"+1\">$pilih2[judul_topik]</font></td>";
echo "<td><font size=\"+1\">$pilih2[isi_topik]</font></td>";
echo "</tr>";
}


echo "</table>"; //membuat tag penutup table
?>

</body>
</html>

<tr>
<body>

<p class="style17">&nbsp;</p>

<td width="24" align="middle" bgcolor="#FF0000"> <a href="anak.php"><< Kembali</a></td>
</body>
</tr>